package com.faxsun.core.service;

import java.util.Date;
import java.util.List;

import mtons.modules.pojos.UserProfile;

import com.faxsun.core.persist.entity.LiveManagerPO;
import com.faxsun.core.persist.entity.LivePO;
import com.faxsun.pojos.view.Live;

public interface LiveAdminService {
	/**
	 * 创建直播
	 * 
	 * @param topic
	 * @param startDate
	 * @param endDate
	 * @return
	 */
	public LivePO save(long userId, String topic, Date startDate, Date endDate);

	/**
	 * 更新直播名称
	 * 
	 * @param id
	 * @param name
	 * @return
	 */
	public LivePO updateLiveName(long id, String name);

	/**
	 * 更新直播分类
	 * 
	 * @param id
	 * @param group
	 * @return
	 */
	public LivePO updateLiveGroup(long id, String group);

	/**
	 * 直播禁言
	 * 
	 * @param liveId
	 * @param userId
	 * @param adminId
	 */
	public void disableSendMsg(long liveId, long userId, long adminId);

	/**
	 * 解除直播禁言
	 * 
	 * @param liveId
	 * @param userId
	 */
	public void enableSendMsg(long liveId, long userId);

	/**
	 * 添加直播员
	 * 
	 * @param liveId
	 * @param userId
	 */
	public void addLiveManager(long liveId, long userId);

	/**
	 * 获取由我创建的直播
	 * 
	 * @param userid
	 * @return
	 */
	public List<LivePO> getMyLive(long userid);

	/**
	 * 获取禁言的用户id列表
	 * 
	 * @param liveId
	 * @return
	 */
	public List<Long> getTalkDisabledUserId(long liveId);

	/**
	 * 获取禁言用户信息
	 * 
	 * @param liveId
	 * @return
	 */
	public List<UserProfile> getTalkDisabledUser(long liveId);

	/**
	 * 
	 * @param userid
	 * @param liveid
	 * @return
	 */
	public LiveManagerPO getLiveManager(long userid, long liveid);

	/**
	 * 获取直播的直播员
	 * 
	 * @param liveid
	 * @return
	 */
	public List<LiveManagerPO> getLiveManagers(long liveid);

	/**
	 * 获取直播的直播员id列表
	 * 
	 * @param liveid
	 * @return
	 */
	public List<Long> getLiveManagersIds(long liveid);

	/**
	 * 保存或更新直播
	 * 
	 * @param userId
	 * @param channel
	 * @return
	 */
	public LivePO save(long userId, LivePO channel);

	/**
	 * 获取直播的admin
	 * 
	 * @param liveid
	 * @return
	 */
	public LiveManagerPO getLiveAdmin(long liveid);

	/**
	 * 获取带有互动统计的直播信息
	 * 
	 * @param userId
	 * @return
	 */
	public List<Live> getMyLiveWithNop(long userId);
    
    /**
     * 删除直播员
     * @param liveid
     * @param userid
     */
    public boolean removeManager(long liveid,long userid);

}
